package com.zixun.repository.request;

import com.zixun.model.request.RequestComment;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * Created by Basil on 16/8/23.
 */

public interface RequestCommentRepository extends JpaRepository<RequestComment,Integer>,JpaSpecificationExecutor<RequestComment>{

    @Query("select comment from RequestComment comment where comment.requestId = :id")
    List<RequestComment> findByRequestId(@Param("id")Integer id);
}
